   Select a.*, b.descricao as nomeuso, c.descricao as nomeapre ;
     from Receitas a, Tipos b, Tipos c ;
    where uso       = b.codigo and b.tipo = 'U' ;
      and apresenta = c.codigo and c.tipo = 'E' ;
      and a.interno = 20152 ;
    order by uso, Medicament ;
     into cursor ctmp

